Adwaita: Fix window shadow size
authorMatthias Clasen <mclasen@redhat.com>
Sat, 14 Nov 2015 17:55:34 +0000 (12:55 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 14 Nov 2015 17:55:34 +0000 (12:55 -0500)
Ensure that the shadow extents don't change as we go to backdrop,
to prevent windows from jumping.

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index e4f27c34df094e32dde498f373da46cdaf20c465..519ca12a28b23cca97fb54ed039a33ae313fbcdc 100644 (file)
@@ -3262,7 +3262,11 @@ decoration {
   margin: 10px;
 
   &:backdrop {
+    /* the transparent shadow here is to enforce that the shadow extents don't
+     * change when we go to backdrop, to prevent jumping windows
+     */
     box-shadow: 0 2px 6px 2px transparentize(black, 0.8),
+                0 3px 9px 1px transparent,
                 0 0 0 1px $_wm_border_backdrop;
   }
   .tiled & {
index 05f5b4ed897fddcf40717aefd47c06294dffc8d0..b37f335456b868ab2c68f09e5491e65d494a25e5 100644 (file)
@@ -4409,7 +4409,10 @@ decoration {
   /* this is used for the resize cursor area */
   margin: 10px; }
   decoration:backdrop {
-    box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(28, 31, 31, 0.9); }
+    /* the transparent shadow here is to enforce that the shadow extents don't
+     * change when we go to backdrop, to prevent jumping windows
+     */
+    box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 3px 9px 1px transparent, 0 0 0 1px rgba(28, 31, 31, 0.9); }
   .tiled decoration {
     border-radius: 0; }
   .popup decoration {
index e640761b82c12d13dd826be6594926d87e48d58a..623508b5672a6af279d709322830b0185f108c47 100644 (file)
@@ -4581,7 +4581,10 @@ decoration {
   /* this is used for the resize cursor area */
   margin: 10px; }
   decoration:backdrop {
-    box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.18); }
+    /* the transparent shadow here is to enforce that the shadow extents don't
+     * change when we go to backdrop, to prevent jumping windows
+     */
+    box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 3px 9px 1px transparent, 0 0 0 1px rgba(0, 0, 0, 0.18); }
   .tiled decoration {
     border-radius: 0; }
   .popup decoration {